import { axios } from '@/utils/request'

const api = {
  fastRegister: '/wechat-third/fast-register-mini',
  authorizationConfig: '/wechat-third/get-back-info',
  list: '/wechat-third/get-mini-list',
  detail: '/wechat-third/get-mini',
  editPic: '/wechat-third/set-head-image',
  editSignature: '/wechat-third/set-signature',
  editName: '/wechat-third/set-nickname',
  allCalss: '/wechat-third/get-all-categories',
  deleteClass: '/wechat-third/del-category',
  addClass: '/wechat-third/add-category',
  templateList: '/wechat-third/template-list',
  check: '/wechat-third/submit-audit',
  preview: '/wechat-third/get-mini-qrcode',
  addPreviewer: '/wechat-third/add-tester',
  useApplet: '/wechat-third/mini-is-use',
  cancleCheck: '/wechat-third/undo-code-audit',
  authorization: '/wechat-third/get-mini-info',
  checkName: '/wechat-third/check-nickname',
  issue: '/wechat-third/release',
  upload: '/wechat-third/up-mini',
  delBindQrcode: '/wechat-third/del-bind-qrcode',
  canUsePlugin: '/wechat-third/can-use-plug',
  alipayAuthorization: '/alipay-third/get-params',
  alipayGetInfo: '/alipay-third/get-info',
  alipayList: '/alipay-third/mini-list',
  alipayCategories: '/alipay-third/categories',
  alipayInfo: '/alipay-third/mini-info',
  alipaySubmit: '/alipay-third/mini-audit-apply',
  alipayCancleApply: '/alipay-third/cancel-mini-submit-audit',
  issueAlipay: '/alipay-third/mini-online',
  rollbackAlipay: '/alipay-third/version-cancel',
  previewAlipay: '/alipay-third/create-mini-experience',
  alipayAddMember: '/alipay-third/add-member',
  cancleExperience: '/alipay-third/cancel-mini-experience',
  promotionAlipay: '/alipay-third/mini-qrcode-create',
  alipayRegister: '/alipay-third/isv-create-mini',
  alipayDetail: '/alipay-third/get-isv-create-mini',
  ocr: '/ocr/info',
  updateAlipay: '/alipay-third/up-mini',
  getField: 'alipay-third/get-field',
  aliAuth: '/alipay-third/apply-phone',
  officialQr: '/wechat-third/get-mini-qr',
  getBandStatus: '/aggregate-qrcode/mini-info',
  bandMini: '/aggregate-qrcode/bind-mini',
  SignContract: '/alipay-third/sign-contract',
  useAlipayApplet: '/alipay-third/mini-is-use',
  getShopBaseData: '/alipay/alipay-app-shop/get-shop-base-data',
  createdShop: 'alipay/alipay-app-shop/created-shop',
  basedata: 'alipay/alipay-app/basedata',
  getMerchantSign: '/alipay-third-merchant/get-info',
  merchantPay: '/alipay-third-merchant/merchant-pay',
}

export default api

export function authorizationConfig(parameter) {
  return axios({
    url: api.authorizationConfig,
    method: 'get',
    params: parameter,
  })
}

export function fastRegister(parameter) {
  return axios({
    url: api.fastRegister,
    method: 'post',
    data: parameter,
  })
}
export function list(parameter) {
  return axios({
    url: api.list,
    method: 'get',
    params: parameter,
  })
}
export function detail(parameter) {
  return axios({
    url: api.detail,
    method: 'post',
    data: parameter,
  })
}
export function editPic(parameter) {
  return axios({
    url: api.editPic,
    method: 'post',
    data: parameter,
  })
}
export function editSignature(parameter) {
  return axios({
    url: api.editSignature,
    method: 'post',
    data: parameter,
  })
}
export function editName(parameter) {
  return axios({
    url: api.editName,
    method: 'post',
    data: parameter,
  })
}
export function allCalss(parameter) {
  return axios({
    url: api.allCalss,
    method: 'post',
    data: parameter,
  })
}
export function deleteClass(parameter) {
  return axios({
    url: api.deleteClass,
    method: 'post',
    data: parameter,
  })
}
export function addClass(parameter) {
  return axios({
    url: api.addClass,
    method: 'post',
    data: parameter,
  })
}
export function templateList(parameter) {
  return axios({
    url: api.templateList,
    method: 'post',
    data: parameter,
  })
}
export function check(parameter) {
  return axios({
    url: api.check,
    method: 'post',
    data: parameter,
  })
}
export function preview(parameter) {
  return axios({
    url: api.preview,
    method: 'post',
    data: parameter,
  })
}
export function addPreviewer(parameter) {
  return axios({
    url: api.addPreviewer,
    method: 'post',
    data: parameter,
  })
}
export function useApplet(parameter) {
  return axios({
    url: api.useApplet,
    method: 'post',
    data: parameter,
  })
}
export function cancleCheck(parameter) {
  return axios({
    url: api.cancleCheck,
    method: 'post',
    data: parameter,
  })
}
export function authorization(parameter) {
  return axios({
    url: api.authorization,
    method: 'post',
    data: parameter,
  })
}
export function checkName(parameter) {
  return axios({
    url: api.checkName,
    method: 'post',
    data: parameter,
  })
}

export function issue(parameter) {
  return axios({
    url: api.issue,
    method: 'post',
    data: parameter,
  })
}

export function upload(parameter) {
  return axios({
    url: api.upload,
    method: 'post',
    data: parameter,
  })
}

export function delBindQrcode(parameter) {
  return axios({
    url: api.delBindQrcode,
    method: 'post',
    data: parameter,
  })
}

export function alipayAuthorization(parameter) {
  return axios({
    url: api.alipayAuthorization,
    method: 'get',
    params: parameter,
  })
}

export function alipayGetInfo(parameter) {
  return axios({
    url: api.alipayGetInfo,
    method: 'post',
    data: parameter,
  })
}

export function alipayList(parameter) {
  return axios({
    url: api.alipayList,
    method: 'get',
    params: parameter,
  })
}

export function alipayCategories(parameter) {
  return axios({
    url: api.alipayCategories,
    method: 'post',
    data: parameter,
  })
}

export function alipayInfo(parameter) {
  return axios({
    url: api.alipayInfo,
    method: 'post',
    data: parameter,
  })
}

export function alipaySubmit(parameter) {
  return axios({
    url: api.alipaySubmit,
    method: 'post',
    data: parameter,
  })
}

export function alipayCancleApply(parameter) {
  return axios({
    url: api.alipayCancleApply,
    method: 'post',
    data: parameter,
  })
}

export function issueAlipay(parameter) {
  return axios({
    url: api.issueAlipay,
    method: 'post',
    data: parameter,
  })
}

export function rollbackAlipay(parameter) {
  return axios({
    url: api.rollbackAlipay,
    method: 'post',
    data: parameter,
  })
}

export function previewAlipay(parameter) {
  return axios({
    url: api.previewAlipay,
    method: 'post',
    data: parameter,
  })
}

export function alipayAddMember(parameter) {
  return axios({
    url: api.alipayAddMember,
    method: 'post',
    data: parameter,
  })
}

export function cancleExperience(parameter) {
  return axios({
    url: api.cancleExperience,
    method: 'post',
    data: parameter,
  })
}

export function promotionAlipay(parameter) {
  return axios({
    url: api.promotionAlipay,
    method: 'post',
    data: parameter,
  })
}

export function alipayRegister(parameter) {
  return axios({
    url: api.alipayRegister,
    method: 'post',
    data: parameter,
  })
}

export function alipayDetail(parameter) {
  return axios({
    url: api.alipayDetail,
    method: 'post',
    data: parameter,
  })
}
// ocr解析  url图片地址  type 1营业执照  2身份证  3银行卡    side(type为2时必传) back/face
export function ocr(parameter) {
  return axios({
    url: api.ocr,
    method: 'post',
    data: parameter,
  })
}

export function updateAlipay(parameter) {
  return axios({
    url: api.updateAlipay,
    method: 'post',
    data: parameter,
  })
}

export function getField(parameter) {
  return axios({
    url: api.getField,
    method: 'post',
    data: parameter,
  })
}

export function aliAuth(parameter) {
  return axios({
    url: api.aliAuth,
    method: 'post',
    data: parameter,
  })
}

export function officialQr(parameter) {
  return axios({
    url: api.officialQr,
    method: 'post',
    data: parameter,
  })
}

export function getBandStatus(parameter) {
  return axios({
    url: api.getBandStatus,
    method: 'get',
    params: parameter,
  })
}

export function bandMini(parameter) {
  return axios({
    url: api.bandMini,
    method: 'post',
    data: parameter,
  })
}

export function signContract(parameter) {
  return axios({
    url: api.SignContract,
    method: 'post',
    data: parameter,
  })
}

export function getMerchantSign(parameter) {
  return axios({
    url: api.getMerchantSign,
    method: 'get',
    params: parameter,
  })
}

export function merchantPay(parameter) {
  return axios({
    url: api.merchantPay,
    method: 'post',
    data: parameter,
  })
}

export function useAlipayApplet(parameter) {
  return axios({
    url: api.useAlipayApplet,
    method: 'post',
    data: parameter,
  })
}

export function getShopBaseData(data) {
  return axios({
    url: api.getShopBaseData,
    method: 'post',
    data,
  })
}

export function createdShop(data) {
  return axios({
    url: api.createdShop,
    method: 'post',
    data,
  })
}

export function basedata(params) {
  return axios({
    url: api.basedata,
    method: 'get',
    params,
  })
}

export function canUsePlugin(data) {
  return axios({
    url: api.canUsePlugin,
    method: 'post',
    data,
  })
}
